/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-05-09 11:02:48
 * @LastEditors: icymoon911 icymoon911@163.com
 * @LastEditTime: 2024-10-14 17:03:46
 * @FilePath: \ken147258.topayClient\src\api\other\order.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */


import request from "@/utils/request";
import { AxiosPromise } from "axios";

const URL = {
  // add: '/config/add',
  // dels: '/config/dels',
  update: '/config/update',
  list: '/config/getList',
  getMyName: '/config/getMyName',
  setMyName: '/config/setMyName',
  botConfigUpdate: '/config/botConfigUpdate'
};

// export function add(data: object): AxiosPromise<any> {
//   return request({
//     url: URL.add,
//     method: "post",
//     data: data,
//   });
// }

// export function dels(data: object): AxiosPromise<any> {
//   return request({
//     url: URL.dels,
//     method: "post",
//     data: data,
//   });
// }

export function update(data: object): AxiosPromise<any> {
  return request({
    url: URL.update,
    method: "post",
    data: data,
  });
}

export function list(data: object): AxiosPromise<any> {
  return request({
    url: URL.list,
    method: "get",
    params: data,
  });
}

export function getMyName(): AxiosPromise<any> {
  return request({
    url: URL.getMyName,
    method: "get",
  });
}

export function botConfigUpdate(data: object): AxiosPromise<any> {
  return request({
    url: URL.botConfigUpdate,
    method: "post",
    data,
  });
}
